import org.anderson.FitJPA.ExtendingClass
import org.easyspec.EasySpec
import org.easyspec.Context

/**
 * Created by IntelliJ IDEA.
 * User: HP_Administrator
 * Date: Sep 4, 2008
 * Time: 10:31:03 PM
 * To change this template use File | Settings | File Templates.
 */
@EasySpec(interest='EntityParser')
class EntityParser_when_input_is_invalid_Test extends GroovyTestCase {

    EntityParser parser
    def data

    @Context('when the input class is not an entity')
    public void setUp() {
        parser = new EntityParser()
        data = ['apiNumber':'12345678901234']
    }

    public void test_parse_should_force_entity_annotation() {
        shouldFail {
            parser.parse(this.class, data)
        }

    }
}